home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / supcdefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  4.0 KB  |  131 lines

  1. /*
  2.  * Copyright (c) 1992 Carnegie Mellon University
  3.  * All Rights Reserved.
  4.  * 
  5.  * Permission to use, copy, modify and distribute this software and its
  6.  * documentation is hereby granted, provided that both the copyright
  7.  * notice and this permission notice appear in all copies of the
  8.  * software, derivative works or modified versions, and any portions
  9.  * thereof, and that both notices appear in supporting documentation.
  10.  *
  11.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  12.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  13.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  14.  *
  15.  * Carnegie Mellon requests users of this software to return to
  16.  *
  17.  *  Software Distribution Coordinator  or  Software_Distribution@CS.CMU.EDU
  18.  *  School of Computer Science
  19.  *  Carnegie Mellon University
  20.  *  Pittsburgh PA 15213-3890
  21.  *
  22.  * any improvements or extensions that they make and grant Carnegie Mellon
  23.  * the rights to redistribute these changes.
  24.  */
  25. /*
  26.  *    supcdefs.h -- Declarations shared by the collection of files
  27.  *            that build the sup client.
  28.  *
  29.  **********************************************************************
  30.  * HISTORY
  31.  * 7-July-93  Nate Williams at Montana State University
  32.  *    Modified SUP to use gzip based compression when sending files
  33.  *    across the network to save BandWidth
  34.  *
  35.  * $Log: supcdefs.h,v $
  36.  * Revision 1.2  1993/08/04  17:46:16  brezak
  37.  * Changes from nate for gzip'ed sup
  38.  *
  39.  * Revision 1.1.1.1  1993/05/21  14:52:18  cgd
  40.  * initial import of CMU's SUP to NetBSD
  41.  *
  42.  * Revision 1.6  92/08/11  12:06:52  mrt
  43.  *     Added CFURELSUF  - use-release-suffix flag
  44.  *     Made rpause code conditional on MACH rather than CMUCS
  45.  *     [92/07/26            mrt]
  46.  * 
  47.  * Revision 1.5  92/02/08  18:23:57  mja
  48.  *     Added CFKEEP flag.
  49.  *     [92/01/17            vdelvecc]
  50.  * 
  51.  * 10-Feb-88  Glenn Marcy (gm0w) at Carnegie-Mellon University
  52.  *    Added timeout for backoff.
  53.  *
  54.  * 28-Jun-87  Glenn Marcy (gm0w) at Carnegie-Mellon University
  55.  *    Added Crelease for "release" support.
  56.  *
  57.  * 25-May-87  Doug Philips (dwp) at Carnegie-Mellon University
  58.  *    Created.
  59.  *
  60.  **********************************************************************
  61.  */
  62.  
  63. #include <libc.h>
  64. #include <netdb.h>
  65. #include <signal.h>
  66. #include <setjmp.h>
  67. #include <pwd.h>
  68. #include <grp.h>
  69. #include <sys/types.h>
  70. #include <sys/stat.h>
  71. #include <sys/time.h>
  72. #include <sys/file.h>
  73. #include <sys/errno.h>
  74. #if    MACH            /* used by resource pausing code only */
  75. #include <sys/ioctl.h>
  76. #include <sys/resource.h>
  77. #endif    /* MACH */
  78. #include <c.h>
  79. #include "sup.h"
  80. #include "supmsg.h"
  81.  
  82. extern int errno;
  83. extern uid_t getuid();
  84. extern gid_t getgid();
  85. extern long time();
  86.  
  87. extern int PGMVERSION;
  88.  
  89. /*******************************************
  90.  ***    D A T A   S T R U C T U R E S    ***
  91.  *******************************************/
  92.  
  93. struct collstruct {            /* one per collection to be upgraded */
  94.     char *Cname;            /* collection name */
  95.     TREE *Chost;            /* attempted host for collection */
  96.     TREE *Chtree;            /* possible hosts for collection */
  97.     char *Cbase;            /* local base directory */
  98.     char *Chbase;            /* remote base directory */
  99.     char *Cprefix;            /* local collection pathname prefix */
  100.     char *Crelease;            /* release name */
  101.     char *Cnotify;            /* user to notify of status */
  102.     char *Clogin;            /* remote login name */
  103.     char *Cpswd;            /* remote password */
  104.     char *Ccrypt;            /* data encryption key */
  105.     int Ctimeout;            /* timeout for backoff */
  106.     int Cflags;            /* collection flags */
  107.     int Cnogood;            /* upgrade no good, "when" unchanged */
  108.     int Clockfd;            /* >= 0 if collection is locked */
  109.     struct collstruct *Cnext;    /* next collection */
  110. };
  111. typedef struct collstruct COLLECTION;
  112.  
  113. #define CFALL        00001
  114. #define CFBACKUP    00002
  115. #define CFDELETE    00004
  116. #define CFEXECUTE    00010
  117. #define CFLIST        00020
  118. #define CFLOCAL        00040
  119. #define CFMAIL        00100
  120. #define CFOLD        00200
  121. #define CFVERBOSE    00400
  122. #define CFKEEP        01000
  123. #define CFURELSUF    02000
  124. #define CFCOMPRESS    04000
  125.  
  126. /*************************
  127.  ***    M A C R O S    ***
  128.  *************************/
  129.  
  130. #define vnotify    if (thisC->Cflags&CFVERBOSE)  notify
  131.